<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class Ninio extends CActiveRecord {
    private $connections;
    public function _construct(){
        $this->connections=new CDbConnection($Yii::app()->db->connectionstring,$Yii::app()->db->username,$Yii::app()->db->password);
        $this->connections->active=true;
    }
    
    public static function model($className = __CLASS__) {
        return parent::model($className);
    }
    
    public function getNinio(){
        $sql= "select id, , , from ninio;";
        // $dataReader= $this->connections->createCommand($sql)->query();
        $rown= $this->connections->createCommand($sql)->queryAll();
        return rown;
    }
}
